@namespace Microsoft.FluentUI.AspNetCore.Components
@inherits FluentComponentBase
@if (Visible)
{
    if (Stroke != ProgressStroke.Normal || !string.IsNullOrEmpty(Color) || !string.IsNullOrEmpty(BackgroundColor))
    {
        <style>
            @if (Value == null)
            {
                @($" #{Id}::part(progress) {{ {StyleIndeterminate} }}")
                @($" #{Id}::part(indeterminate-indicator-1) {{ {StyleIndeterminateIndicator} }}")
                @($" #{Id}::part(indeterminate-indicator-2) {{ {StyleIndeterminateIndicator} }}")
            }
            else
            {
                @($" #{Id}::part(progress) {{ {StyleProgress} }}")
                @($" #{Id}::part(determinate) {{ {StyleProgressIndicator} }}")
            }
        </style>
    }

    <fluent-progress id="@Id"
                     @ref=Element
                     class="@ClassValue"
                     style="@StyleValue"
                     min="@Min"
                     max="@Max"
                     value="@Value"
                     Paused="@Paused"
                     @attributes="AdditionalAttributes">
        @ChildContent
    </fluent-progress>
}